﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules.System.Area
{
    /// <summary>
    /// 区域表
    ///</summary>
    [TableName("sys_area")]
    [Description("行政地区表")]
    [PrimaryKey("id", AutoIncrement = false)]
    [CacheSetting(true)]
    [Serializable]
    public class SysArea : IEntity
    {
        /// <summary>
        /// 主键
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 父级
        ///</summary>
        [Column("pid")]
        public int Pid { get; set; }

        /// <summary>
        /// 深度
        ///</summary>
        [Column("deep")]
        public int Deep { get; set; }

        /// <summary>
        /// 名称
        ///</summary>
        [Column("name")]
        public string Name { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return Id; } }

        #endregion IEntity 成员
    }
}